import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import '../node_modules/element-ui/lib/theme-chalk/index.css'
import moment from 'moment'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(ElementUI)
Vue.use(VueQuillEditor)

Vue.config.productionTip = false
Vue.filter('rename', (value) => {
  switch (value) {
    case '0':
      value = '一级'
      break
    case '1':
      value = '二级'
      break
    case '2':
      value = '三级'
      break
    default:
      break
  }
  return value
})
Vue.filter('time', function (value, str = 'YYYY-MM-DD HH:mm:ss') {
  return moment(value * 1000).format(str)
})
new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
